<template>
	<div class="addGateway">
		<van-nav-bar title="添加网关" left-arrow="" @click-left='goBack()'>
			<van-button type="primary" slot='right' color="#62cff9">保存</van-button>
		</van-nav-bar>
		<div class="area">
			<van-cell-group>
				<van-field required="" :clearable='true' label="网关名称" placeholder="请输入网关名称" v-model="gatewayName"></van-field>
				<van-field required="" :clearable='true' label="网关序列号" v-model="num" placeholder="请输入网关序列号"></van-field>
				<van-field required="" :clearable='true' label="网关所在地" v-model="address" placeholder="请输入网管所在地"></van-field>
				<div class="status">
					<van-switch-cell inactive-color='ghostwhite' active-color='#58a5f3' v-model="gatewayStatus" title="网关通信状态" />
					<span class="statusText">{{gatewayStatus?'正常':'关闭'}}</span>
				</div>
			</van-cell-group>

		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				
				gatewayName: '',
				num: '',
				address: '',
				gatewayStatus: false
			}
		},
		methods:{
			
		}
	}
</script>

<style scoped="scoped">
	.van-button{
		border-radius: 7px;
		height: 1.8rem;
		line-height: 1.8rem;
	}
	.area {
		margin-top: 1rem;
	}
	.status{
		display: flex;
	}
	.status .van-switch-cell{
		flex: 8;
	}
	.status .statusText{
		flex: 2;
		line-height: 2.75rem;
		font-size: .8rem;
		color: #888;
	}
</style>
